using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace ChildrenOfWar
{
    //Simple 2D camera. It scrolls left, right, up, and down. Rotation, zooming, and scaleing are not avalible
    class COWCamera
    {
        public Vector2 pos; // Camera Position
        //protected float rotation; // Camera Rotation

        public COWCamera()
        {
            //rotation = 0.0f;
            pos = Vector2.Zero;
        }

        /*public float Rotation
        {
            get { return rotation; }
            set { rotation = value; }
        }*/

        // Move the camera by the amount provided.
        public void Move(Vector2 amount)
        {
            pos += amount;
        }

        // Get and set position
        public Vector2 Pos
        {
            get { return pos; }
            set { pos = value; }
        }

        public Matrix getCamTrans(GraphicsDevice graphicsDevice)
        {
            return Matrix.CreateTranslation(new Vector3(-pos.X, -pos.Y, 0)) *
                                         //Matrix.CreateRotationZ(Rotation) *
                                         Matrix.CreateTranslation(new Vector3(graphicsDevice.Viewport.Width * 0.5f, graphicsDevice.Viewport.Height * 0.5f, 0)); ;
        }
    }
}
